package com.ksyun.cloudhostalarmprocessing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李厚航
 * @since 2024-05-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("rules")
@ApiModel(value = "Rules对象", description = "")
public class Rules implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("规则名称")
    @TableField("rule_name")
    private String ruleName;

    @ApiModelProperty("指标名称")
    @TableField("metric_name")
    private String metricName;

    @ApiModelProperty("告警阈值")
    @TableField("value")
    private Float value;

    public Rules(String ruleName, String metricName, Float value) {
        this.ruleName = ruleName;
        this.metricName = metricName;
        this.value = value;
    }
}
